<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<html>
<head>
<title></title>
</head>
<body>
<f:view>
	<h:panelGrid columns="1">
		<h:form>
			<h:panelGrid columns="1">
				<h:panelGroup>
					<h:outputLabel value="Enter your welcome message " for="input" />
					<h:inputText id="input" value="#{bean.message}">
						<a4j:support event="onchange" actionListener="#{bean.listen}">
						<a4j:actionparam name="id" value="out" assignTo="#{bean.message}"></a4j:actionparam>
						</a4j:support> 
					</h:inputText>
				</h:panelGroup>
				<h:inputText id="out" value="#{bean.message}" binding="#{bean.comp}"/>
				<h:commandButton action="#{bean.welcome}" value="welcome" />
			</h:panelGrid>
		</h:form>
		<h:form rendered="#{bean.welcomeMessage!=null}">
			<h:outputLabel value="#{bean.welcomeMessage}" for="" />
		</h:form>
	</h:panelGrid>
</f:view>
</body>
</html>
